package cn.edu.neu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.neu.mapper.CinemaMapper;
import cn.edu.neu.model.Cinema;

@Service
@Transactional
public class CinemaServiceImpl implements CinemaService {

	@Resource
	private CinemaMapper mapper;

	@Override
	public List<Cinema> getAllCinema() {
		List<Cinema> cinemas = mapper.getAllCinema();
		return cinemas;
	}

	@Override
	public Cinema findCinemaById(String cinemaId) {
		Cinema c = mapper.findCinemaById(cinemaId);
		return c;
	}

	@Override
	public int updateCiname(String cinemaname, String address, String tel, String service, String cinemapic,
			String minprice, String cinemaId) {
		int c = mapper.updateCiname(cinemaname, address, tel, service, cinemapic, minprice, cinemaId);
		return c;
	}

}
